package ufo.api.action

import common._
import java.io.Serializable
import java.util.UUID

abstract class Action extends Serializable

abstract class BeingAction extends Action {
  def actionPoints() : Int;
  def beingId() : UUID;
}

case class Walk(beingId : UUID, direction : Direction) extends BeingAction {
//case class Walk(_beingId : UUID, direction : Direction) extends BeingAction(_beingId) {
  def actionPoints() : Int = direction match {
    case North => 2
    case South => 2
    case West => 2
    case East => 2
    case NorthEast => 3
    case NorthWest => 3
    case SouthEast => 3
    case SouthWest => 3
  }
}

case class EndTurn() extends Action

case class FireWeapon(beingId: UUID, position: Position) extends BeingAction {
	def actionPoints() : Int = 1
}